package com.lmx.persistence.flow.state.employee.leave;

import com.lmx.common.constants.CommonConstants;
import com.lmx.persistence.flow.enums.EmployeeLeaveEnum;
import com.lmx.repoDomain.tmodel.BaseFlow;

/**
 * 已申请状态
 *
 * @author ytche
 * @date 2017年7月12日
 *
 */
public class ApplyState extends BaseEmployeeLeaveState {

	@Override
	public void next(BaseFlow flow) {

		EmployeeLeaveEnum flowStatus = flow != null
				&& flow.getResult()
						.equals(CommonConstants.DEFAULT_STATUS_YES_1) ? EmployeeLeaveEnum.PASS_YES
				: EmployeeLeaveEnum.PASS_NO;
		flow.setFlowStatus(flowStatus.getValue());
	}
}
